Page({
  data: {
    startX: 0,
    moveDistance: 0
  },
  touchStart: function (e) {
    this.setData({
      startX: e.changedTouches[0].clientX
    });
  },
  touchMove: function (e) {
    const currentX = e.changedTouches[0].clientX;
    const moveDistance = currentX - this.data.startX;
    this.setData({
      moveDistance: moveDistance
    });
  },
  touchEnd: function (e) {
    const moveDistance = this.data.moveDistance;
    if (moveDistance > 10) { // 可根据实际情况调整滑动距离阈值
      wx.navigateTo({
        url: '/pages/login/login'
      });
    }
  }
});